package com.cqtd.common.dict.dao.hibernate;

import org.springframework.stereotype.Repository;

import com.cqtd.common.base.dao.FooGenericDaoImpl;
import com.cqtd.common.dict.dao.CqSystemDictTypeDao;
import com.cqtd.common.dict.model.CqSystemDictType;
import com.googlecode.genericdao.search.Search;

@Repository
public class CqSystemDictTypeDaoImpl extends FooGenericDaoImpl<CqSystemDictType, String> implements CqSystemDictTypeDao {
	
	public String id2Name(String dictId) {
		String result = "";
		Search search = new Search();
		search.addFilterEqual("dictId", dictId);
		CqSystemDictType cqSystemDictType = this.searchUnique(search);
		if(cqSystemDictType!=null && !cqSystemDictType.getDictId().equals("")){
			result = cqSystemDictType.getDictId();
		}
		return result;
	}
	

}
